﻿ 
<!DOCTYPE html>  
<html>  
<head>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    <meta name="keywords" content="职位候选人推荐">  
    <meta name="description" content="职位候选人推荐">  
    <title>向客户推荐人选管理</title>  
    
    <%@ include file="/WEB-INF/inc/default.jsp"%>
    <jsp:include page="/WEB-INF/inc/dic.jsp"/> 	    

</head>  
<body>  
    
    <div class="easyui-layout" align=center style="width:100%;height:600px;overflow:hidden"> 
    	   <div data-options="region:'north',split:true" style="width:100%;height:300px">  
              <table id="dg"  class="easyui-datagrid" style="height:290px"  
                      url="/project/contractJobCvRecom/jobcvrecomlist.do"  
                      toolbar="#toolbar" pagination="true"  
                      rownumbers="true" fitColumns="true" loadMsg="正在查询,请稍候..." singleSelect="true">  
              
              </table>  
         </div>
         <div data-options="region:'center',iconCls:'icon-ok'" style="width:100%"> 
              	<div id="tab_panel" class="easyui-tabs" style="height:250px">  
                         <div title="联系记录" url="/project/searchProjectCvCrm/managerPage.do" >  
                         
                             <iframe  name="tab_panel0" src="" style="width:98%;height:99%"></iframe>  
                         </div>  
                         <div title="顾问面试记录" url="/project/searchProjectInterview/managerPage.do">  
                             <iframe  name="tab_panel1" src="" style="width:98%;height:99%"></iframe>  
                         </div>  
                         <div title="客户面试记录" url="/project/contractJobCvInterview/managerPage.do" >  
                             <iframe " name="tab_panel3" src="" style="width:98%;height:99%"></iframe> 
                         </div>
                         <div title="录用offer"  url="/project/contractJobCvOffer/jobOfferPage.do">  
                             <iframe  name="tab_panel4" src="" style="width:98%;height:99%"></iframe> 
                         </div>
                         <div title="背景调查" url="/project/contractJobCvBackground/managerPage.do">  
                             <iframe " name="tab_panel5" src="" style="width:98%;height:99%"></iframe>
                         </div>
                         <div title="推荐信记录" url="/project/contractJobCvJd/managerPage.do?type=2">  
                             <iframe " name="tab_panel6" src="" style="width:98%;height:99%"></iframe>
                         </div>
                         
                </div> 
          </div>
    </div>
    <div id="toolbar">  
        
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="find()">查询</a>
    </div>  
    
    <!-- query form窗体(开始) -->  
    <div id="dlg_query" style="display:none;">  
    	 <!--
        
        <form id="fm_query" method="post" novalidate>  
            
              
	        		     <div class="fitem">  
                     <label style="width:100px">职位id:</label>                       
                     <input name="jobId" class="easyui-numberbox">                       
                   </div>	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">简历id:</label>                       
                     <input name="cvId" class="easyui-numberbox">                       
                   </div>	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">推荐原因(优势):</label>                                            
                     <input name="recomResult" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">劣势:</label>                                            
                     <input name="recomRisk" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">文件大小:</label>                                            
                     <input name="docSize" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">exportTemplate:</label>                       
                     <input name="exportTemplate" class="easyui-numberbox">                       
                   </div>	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">自动生成的推荐表文件:</label>                                            
                     <input name="exportDoc" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">直接上传的推荐表文件:</label>                                            
                     <input name="uploadDoc" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">uploadDocEn:</label>                                            
                     <input name="uploadDocEn" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">是否需要短信通知:</label>                                            
                     <input name="isSmsnote" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">状态:</label>                       
                     <input name="status" class="easyui-numberbox">                       
                   </div>	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">创建人:</label>                                            
                     <input name="creator" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">创建时间:</label>                       
                     <input name="createDt" class="easyui-datebox">                         	
                   </div>  	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">修改人:</label>                                            
                     <input name="modifier" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">修改时间:</label>                       
                     <input name="modifiedDt" class="easyui-datebox">                         	
                   </div>  	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">推荐日期:</label>                       
                     <input name="recomDt" class="easyui-datebox">                         	
                   </div>  	        		     
	        		     <div class="fitem">  
                     <label style="width:100px">summary:</label>                                            
                     <input name="summary" class="easyui-box">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">是否发推荐信:</label>                       
                     <input name="isEmail" class="easyui-numberbox">                       
                   </div>	        		     
              
              
        </form>  
        <div  style="text-align:center">  
          <a href="javascript:void(0)" id="btn-query" class="easyui-linkbutton" iconCls="icon-ok" ">查询</a>  
          <a href="javascript:void(0)" id="btn-query-close" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>  
        </div>
        -->
    </div> 
    <!-- query form窗体(结束) -->  
    <div id="dlg-buttons">  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="save()">Save</a>  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>  
    </div>  
    <div id="dlg-buttons-query">  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="query()">确定</a>  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_query').dialog('close')">Cancel</a>  
    </div>  
    <script type="text/javascript">  
        var url;  
        var jobId;
        var cvId=0;
        var cvName;
        var recomId;
        var custId;
        function find(){  
              
                $('#dlg_query').dialog('open').dialog('setTitle','查询');  
                
                url = '/project/contractJobCvRecom/jsonlist.do';  
              
        } 
        	
        function query(){  
                
                //var aa=$('#fm_query').formSerialize();
                var formdata=$('#fm_query').formToArray();
                //var dd= JSON.stringify(cc); 
                
                if (!$('#fm_query').form('validate')) return; 
                $('#dg').datagrid({
	                  queryParams: array2json(formdata)
                });
               $('#dlg_query').dialog('close');
              
        }
        
        //生成grid的字段,需要字典的自动转换
        $('#dg').datagrid({
        	   columns:[[
        	   	
        	   	   {field:'custName',title:'客户公司', width:100}
        	   	   ,{field:'jobNo',title:'职位编号', width:100,hidden:true}
        	   	   ,{field:'jobName',title:'职位名', width:100}
        	   	   ,{field:'cvName',title:'候选人名', width:100}        	   	   
        	   	   ,{field:'cvCompany',title:'现任公司', width:100}
        	   	   ,{field:'cvTitle',title:'现任职位', width:100}
        	   	   ,{field:'mobile',title:'手机', width:100}
        	   	   ,{field:'email',title:'电邮', width:100,hidden:true}
        	   	   ,{field:'recomCreator',title:'推荐人', width:100}
        	   	   ,{field:'recomDt',title:'推荐时间', width:100}
        	   	   ,{field:'jobManager',title:'职位负责人', width:100}
        	   	   ,{field:'cvStatus',title:'人选进展', width:100}
        	   	   ,{field:'jobContacter',title:'客户联系人', width:100,hidden:true}        	   	   
        	   	  
        	   	
        	   ]]
        	   ,onDblClickRow: function(rowIndex, rowData){
        	    	$('#dlg').dialog('open').dialog('setTitle','修改职位候选人推荐');                  
                $('#fm').form('load','/project/contractJobCvRecom/get.do?id='+rowData.id);  
                url = '/project/contractJobCvRecom/update.do';        	    	
        	    }
        	   ,onClickRow: function(rowIndex, rowData){
        	    	
        	    	var tab = $('#tab_panel').tabs('getSelected');
        	      
        	      jobId=rowData.jobId;    
        	      cvId=rowData.cvId;   
        	      cvName=rowData.cvName;   
        	      recomId=rowData.recomId;
        	      custId=rowData.custId;
        	    	tab.find('iframe')[0].contentWindow.location.href=tab.attr('url')+"?jobId="+jobId+"&cvId="+cvId+"&cvName="+cvName+"&recomId="+recomId+"&custId="+custId;
                	    	
        	    }
        }); 
        //完成-生成grid的字段
        $('#dg').datagrid({
	            onLoadSuccess: function(data){		
              if(data.total&&data.total>0) {
              	  $('#dg').datagrid('selectRow',0);
              	  var rowData=$('#dg').datagrid('getSelected');
              	  jobId=rowData.jobId;    
        	        cvId=rowData.cvId;   
        	        recomId=rowData.recomId;
        	        cvName=rowData.cvName;
        	        custId=rowData.custId;
        	        var tab=$('#tab_panel').tabs('getTab', 0);
        	        tab.find('iframe')[0].contentWindow.location.href=tab.attr('url')+"?jobId="+jobId+"&cvId="+cvId+"&cvName="+cvName+"&recomId="+recomId+"&custId="+custId;
              }	
	          }
	       });
	       var selectedTab=0;
        //完成-生成grid的字段
        $('#dg').datagrid({
	            onLoadSuccess: function(data){		
              if(data.total&&data.total>0) {
              	  $('#dg').datagrid('selectRow',0);
              	  var rowData=$('#dg').datagrid('getSelected');
              	          	        
        	        jobId=rowData.jobId;    
        	        cvId=rowData.cvId;   
        	        cvName=rowData.cvName;
        	        recomId=rowData.recomId;
        	        custId=rowData.custId;
        	        var tab=$('#tab_panel').tabs('getTab', selectedTab);
        	        tab.find('iframe')[0].contentWindow.location.href=tab.attr('url')+"?jobId="+jobId+"&cvId="+cvId+"&cvName="+cvName+"&recomId="+recomId+"&custId="+custId;
              }	
	          }
	       });
        //完成-生成grid的字段
         $('#tab_panel').tabs({
        	    onSelect: function(title,index){
        	    
        	    	var tab=$('#tab_panel').tabs('getTab', index);
        	      //if (cvId==0){
        	      	 //alert("请选择候选人");
        	      	 //return;
        	      //}
        	      selectedTab=index;        	    	
        	    	tab.find('iframe')[0].contentWindow.location.href=tab.attr('url')+"?jobId="+jobId+"&cvId="+cvId+"&cvName="+cvName+"&recomId="+recomId+"&custId="+custId;
        	    	
        	    }
        }); 
        
    </script>  
     
     

     
     
     
</body>  
</html>